-
Notifications
You must be signed in to change notification settings - Fork 14k
Fix performance regression with jemalloc #148925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
I could reproduce the performance regression locally, let's see if rustc-perf agrees: @bors try |
This comment has been minimized.
This comment has been minimized.
Fix performance regression with jemalloc
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (f30bc23): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResults (primary -1.7%, secondary 0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 1.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 474.605s -> 473.65s (-0.20%) |
Using the new `override_allocator_on_supported_platforms` feature in `tikv-jemalloc-sys v0.6.1` we can avoid the manual statics.
d4e5eb3 to
84a974f
Compare
|
@bors try |
This comment has been minimized.
This comment has been minimized.
Fix performance regression with jemalloc
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (aef7be6): comparison URL. Overall result: no relevant changes - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary -0.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 2.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 475.201s -> 474.025s (-0.25%) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This is a great cleanup.
Feel free to r=me once you undraft the PR.
| /// and https://github.com/rust-lang/rust/pull/146627 for why we need this. | ||
| /// | ||
| /// NOTE: This is loaded from the sysroot that was built with the other `rustc` crates above, for | ||
| /// some unknown reason this is more performant than building this with Cargo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That might be the LTO config, although we should also pass LTO to rustdoc.
| /// See docs in https://github.com/rust-lang/rust/blob/HEAD/compiler/rustc/src/main.rs | ||
| /// and https://github.com/rust-lang/rust/pull/146627 for why we need this `use` statement. | ||
| #[cfg(any(target_os = "linux", target_os = "macos"))] | ||
| use tikv_jemalloc_sys as _; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would extern crate be needed here too instead of the use?
Fixes the performance regression introduced in #146627.
This effectively reverts 65f0b7a (second commit in that PR), and adds a comment explaining why
extern crateis needed here instead ofuse(we need to loadtikv_jemalloc_sysfrom the sysroot for some reason).r? Kobzol